
import { axios } from '@/utils/request'

const api = {
  productList: '/plugins/product_traceability/product-batch/product-list',
  productBatchList:  '/plugins/product_traceability/product-batch/product-batch-list',
  productBatchEdit: '/plugins/product_traceability/product-batch/product-batch-edit',
 
  productBatchOperate: '/plugins/product_traceability/product-batch/product-batch-operate',
  delProductBatch: '/plugins/product_traceability/product-batch/product-batch-del',
  getQr: '/plugins/product_traceability/product-batch/get-qr',
  getAllGoodsList: '/plugins/product_traceability/product-batch/get-all-goods-list',
}

export default api

export function getProductList (parameter) {
  return axios({
    url: api.productList,
    method: 'get',
    params: parameter
  })
}
export function getProductBatchList (parameter) {
  return axios({
    url: api.productBatchList,
    method: 'get',
    params: parameter
  })
}
export function productBatchEdit (parameter) {
  return axios({
    url: api.productBatchEdit,
    method: 'post',
    data: parameter
  })
}

export function productBatchOperate(parameter) {
  return axios({
    url: api.productBatchOperate,
    method: 'post',
    data: parameter
  })
}



export function delProductBatch (parameter) {
  return axios({
    url: api.delProductBatch,
    method: 'get',
    params: parameter
  })
}
export function getQr (parameter) {
  return axios({
    url: api.getQr,
    method: 'get',
    params:parameter
  })
}


export function getAllGoodsList (parameter) {
  return axios({
    url: api.getAllGoodsList,
    method: 'get',
    params: parameter
  })
}
